const webpack = require('webpack')
const config = require('./webpack.config')

function build() {
  let compiler = webpack(config)
  return new Promise((resolve, reject) => {
    compiler.run((err, status) => {
      if(err){
        console.error(err)
        return false
      }
      // console.log(status)
      resolve()
    })
  })
}

build()